
import json



#读取姓氏语料
def find_bob(json_file,key):
    with open(json_file, 'r',encoding='utf-8') as file:
        data = json.load(file)
        for item in data:
            if item.get('name') == key:
                return item


#获取姓氏起源
def getNameResouce(chckName):
    return find_bob("data/姓氏起源.json", chckName)


if __name__=="__main__":
    
    print(json.dumps(getNameResouce("刘")))
